package net.dopan.pigframe.oss.model.entity;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.*;
import net.dopan.pigframe.core.base.entity.BaseEntity;

import java.io.Serializable;

/**
 * @Package: net.dopan.pigframe.oss.model.entity
 * @Title: OSS
 * @Description: oss文件信息
 * @author: 刘宽
 * @date: 2018/8/15 16:17
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@TableName("sys_oss")
public class OSS extends BaseEntity<OSS> {

    private static final long serialVersionUID = -1266694501665628800L;

    /**
     * 主键 id
     */
    @TableId(value = "id", type = IdType.ID_WORKER)
    private Long id;

    /**
     * 文件地址 url
     */
    private String url;

    /**
     * 原文件名 originalFileName
     */
    @TableField("original_file_name")
    private String originalFileName;

    /**
     * 文件其他信息 tag
     */
    private String tag;

    /**
     * 来源
     */
    private Integer place;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}